package main

import (
	"fmt"
	"net"
	"time"

	"gitee.com/sillyman/simpleUtil/network/pinger"
)

func main() {
	p := pinger.New()
	go func() {
		time.Sleep(time.Second * 10)
		p.Interrupt()
	}()

	p.Ping(net.IPv4(192, 168, 0, 5), 200)

	fmt.Println(pinger.IsAlive("www.baidu.com"))
}
